<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Create a glo instance</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.cubrid-load-from-glo.html">cubrid_load_from_glo</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.cubrid-save-to-glo.html">cubrid_save_to_glo</a></div>
 <div class="up"><a href="oldaliases.cubrid.html">CUBRID 过时的别名和函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.cubrid-new-glo" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">cubrid_new_glo</h1>
  <p class="verinfo">(PECL CUBRID &gt;= 8.3.0)</p><p class="refpurpose"><span class="refname">cubrid_new_glo</span> &mdash; <span class="dc-title">Create a glo instance</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.cubrid-new-glo-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>cubrid_new_glo</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$conn_identifier</code></span>  
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code></span>  
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$file_name</code></span>  
   )</div>

  <p class="para rdfs-comment">
    The <span class="function"><strong>cubrid_new_glo()</strong></span> function is used to create a glo instance in the requested class (glo class).  The glo created is a LO type, and is stored in the <em><code class="parameter">file_name</code></em> file.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.cubrid-new-glo-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
  <dl>

    
  <dt>
<em><code class="parameter">conn_identifier</code></em></dt>

  <dd>
<p class="para">Connection identifier.</p></dd>

   
   
  <dt>
<em><code class="parameter">class_name</code></em></dt>

  <dd>
<p class="para">Name of the class that you want to create a glo in.</p></dd>

   
  
  <dt>
<em><code class="parameter">file_name</code></em></dt>

  <dd>
<p class="para">The file name that you want to save in the newly created glo.</p></dd>

   
  </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.cubrid-new-glo-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
    Oid of the instance created, when process is successful.
  </p>
    <p class="para">
    <strong><code>FALSE</code></strong>, when process is unsuccessful.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.cubrid-new-glo-examples">
  <h3 class="title">范例</h3>
  <div class="example" id="example-1065">
   <p><strong>Example #1 <span class="function"><strong>cubrid_new_glo()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$oid&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">cubrid_new_glo&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">$con</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"glo"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"input.jpg"</span><span style="color: #007700">);<br />if&nbsp;(</span><span style="color: #0000BB">$oid</span><span style="color: #007700">){<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;the&nbsp;type&nbsp;of&nbsp;column&nbsp;"image"&nbsp;is&nbsp;"object"<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$req&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">cubrid_execute&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">$con</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"insert&nbsp;into&nbsp;person(image)&nbsp;values(</span><span style="color: #0000BB">$oid</span><span style="color: #DD0000">)"</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;if&nbsp;(</span><span style="color: #0000BB">$req</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"image&nbsp;inserted&nbsp;successfully"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">cubrid_close_request&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">$req</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">cubrid_commit</span><span style="color: #007700">(</span><span style="color: #0000BB">$con</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;}<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 notes" id="refsect1-function.cubrid-new-glo-notes">
  <h3 class="title">注释</h3>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    为了向下兼容，可以使用下列已废弃的别名：
    <span class="function"><strong>cubrid_new_glo()</strong></span>
   </p>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="para">
    This function is removed from CUBRID 3.1.
   </p>
  </p></blockquote>
 </div>


  <div class="refsect1 seealso" id="refsect1-function.cubrid-new-glo-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.cubrid-save-to-glo.html" class="function" rel="rdfs-seeAlso">cubrid_save_to_glo()</a> - Save requested file in a GLO instance</span></li>  
    <li class="member"><span class="function"><a href="function.cubrid-load-from-glo.html" class="function" rel="rdfs-seeAlso">cubrid_load_from_glo()</a> - Read data from a GLO instance and save it in a file</span></li>  
    <li class="member"><span class="function"><a href="function.cubrid-send-glo.html" class="function" rel="rdfs-seeAlso">cubrid_send_glo()</a> - Read data from glo and send it to std output</span></li>     
   </ul>
  </p>
  </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.cubrid-load-from-glo.html">cubrid_load_from_glo</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.cubrid-save-to-glo.html">cubrid_save_to_glo</a></div>
 <div class="up"><a href="oldaliases.cubrid.html">CUBRID 过时的别名和函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
